public class Solution796 {
    public boolean rotateString(String s, String goal) {
        return s.length()==goal.length() && s.concat(s).contains(goal);
    }

    public static void main(String[] args) {
        System.out.println(new Solution796().rotateString("abcde","cdeab"));
    }
}
